import http from '../utils/http'
const URL = 'http://192.168.221.241:8005'
const URL1 = 'http://192.168.221.229:8001'
const URL2 = '/api'
// 首页第一个echart图发送请求
export default {
    OneEchart() {
        return http({
            url: `${URL}/service_setting/frontPage`,
            method: 'get',
        })
    },
    // 图文视频接口
    // 查询所有数据
    selectGraphic() {
        return http({
            url: `${URL1}/picCourse/selectShuJu`,
            method: 'post'

        })
    },
    // 视频接口
    // 查询数据
    selectVideo() {
        return http({
            url: `${URL2}/videoCourse/findAllVideoCourse`,
            method: 'post',
            data: {}
        })
    },
    // 删除视频
    delVideo(id) {
        console.log(id, 1233);
        return http({
            url: `/api/videoCourse/delVideo`,
            method: 'get',
            params: { id }
        })
    },
    // 查询视频课程
    InquireVideo(obj) {
        return http({
            url: `/api/videoCourse/findAllVideoCourse`,
            method: 'post',
            data: obj
        })
    },
    // 下架视频课程
    xiajia(id) {
        return http({
            url: `/api/videoCourse/xiaJia`,
            method: 'post',
            data: { id }
        })
    },
    // 编辑视频课程
    EditVideo(obj) {
        return http({
            url: '/api/videoCourse/updateVideo',
            method: 'post',
            data: obj
        })
    },
    // 新建视频课程
    AddVideo(obj) {
        return http({
            url: '/api/videoCourse/insertVideo',
            method: 'post',
            data: obj
        })
    }

}
